<template>
	<view class="template-view">
		<view class="image-list">
			<view class="image-item" v-for="(item,index) in pageData.data" @click="onOpenGoods(item)">
				<image :src="$wanlshop.oss(item.image, 172, 0, 1)" mode="aspectFill" class="img"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "WanlPageBanner",
		props: {
			pageData: {
				type: Object,
				default: function() {
					return {
						name: '',
						type: '',
						params: [],
						style: [],
						data: []
					}
				}
			}
		},
		methods:{
			onOpenGoods(item){
				uni.navigateTo({
					url:item.link
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.template-view {
		display: flex;
		flex-direction: column;
		margin: 24rpx;

		.image-item {
			display: flex;
			align-items: center;
			justify-content: center;
			margin-bottom: 20rpx;
			.img{
				width: 100%;
				height: 330rpx;
				border-radius: 20rpx;
			}
		}
		.image-item:last-child{
			margin-bottom: 0;
		}

	}
</style>